<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:70:"/www/wwwroot/xunda-college/application/atxunda/view/type/typeedit.html";i:1701699188;s:69:"/www/wwwroot/xunda-college/application/atxunda/view/index/header.html";i:1700617178;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__css/pintuer.css?v=1.0">
<link rel="stylesheet" href="__PUBLIC__admin/admin.css">
<link rel="stylesheet" href="__PUBLIC__layui/css/layui.css">
<script src="__PUBLIC__js/jquery.js"></script>
<script src="__PUBLIC__js/pintuer.js"></script>
<script src="__PUBLIC__js/cookie.js"></script>
<script src="__PUBLIC__layui/layui.js"></script>
</head>
<style type="text/css">
	.refresh{width: 20px;height: 20px;float: right;margin:10px 20px;display: block;}
</style>
</head>
<?php if(request()->controller() != 'Index'): ?><img src="__PUBLIC__images/refresh.png" class="refresh" title="刷新"><?php endif; ?>
<script type="text/javascript">
	$('.refresh').click(function(){layer.msg('刷新中……');window.location.reload();})
</script>
<script type="text/javascript">
	function openwinx(url,name,w,h) {
		if(!w) w=screen.width-4;
		if(!h) h=screen.height-95;
		window.open(url,name,"width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
	}
</script>
<body>
	<div class="panel admin-panel margin-top" id="add">
		<div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 增加内容</strong></div>
		<div class="body-content">
			<form method="post" class="form-x" action="<?php echo url('type/typeedit'); ?>"  enctype="multipart/form-data">    
				<div class="form-group">
					<div class="label">
						<label>名称：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<?php echo $type_data['type_name']; ?>" name="type_name" data-validate="required:请输入标题" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>专业标题：</label>
					</div>
					<div class="field">
						<select name="nav_id" class="input w50" data-validate="required:请选择阶段">
							<option value="">请选择专业</option>
							<?php if(is_array($nav_data) || $nav_data instanceof \think\Collection): if( count($nav_data)==0 ) : echo "" ;else: foreach($nav_data as $key=>$nav): ?>
							<option value="<?php echo $nav['nav_id']; ?>" <?php if($nav['nav_id'] == $type_data['nav_id']){echo 'selected';}?>><?php echo $nav['nav_name']; ?></option>
							<?php endforeach; endif; else: echo "" ;endif; ?>
						</select>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>片头id</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" name="cast_id" value="<?php echo $type_data['cast_id']; ?>" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>是否免费：</label>
					</div>
					<div class="field">
						<div class="button-group radio">
							<label class="button <?php if($type_data['is_free'] == 1): ?> active <?php endif; ?>">
								<span class="icon icon-check"></span>
								<input name="is_free" value="1" type="radio" <?php if($type_data['is_free'] == 1): ?>  checked="checked" <?php endif; ?>>是
							</label>
							<label class="button <?php if($type_data['is_free'] == 0): ?> active <?php endif; ?>">
								<span class="icon icon-times"></span>
								<input name="is_free" value="0"  type="radio" <?php if($type_data['is_free'] == 0): ?>  checked="checked" <?php endif; ?>>否
							</label>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>是否在前台页面展示：</label>
					</div>
					<div class="field">
						<div class="button-group radio">
							<label class="button <?php if($type_data['is_show'] == 1): ?> active <?php endif; ?>">
								<span class="icon icon-check"></span>
								<input name="is_show" value="1" type="radio" <?php if($type_data['is_show'] == 1): ?>  checked="checked" <?php endif; ?>>是
							</label>
							<label class="button <?php if($type_data['is_show'] == 0): ?> active <?php endif; ?>">
								<span class="icon icon-times"></span>
								<input name="is_show" value="0"  type="radio" <?php if($type_data['is_show'] == 0): ?>  checked="checked" <?php endif; ?>>否
							</label>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>描述：</label>
					</div>
					<div class="field">
						<textarea class="input" name="type_desc" style="height:180px"  data-validate="required:请输入描述"><?php echo $type_data['type_desc']; ?></textarea>
						<div class="tips">一句话介绍本分类</div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>排序：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" name="type_sort" value="<?php echo !empty($type_data['type_sort'])?$type_data['type_sort']: 0; ?>"  data-validate="required:,number:排序必须为数字" />
						<div class="tips"></div>
					</div>
				</div>
				<input type="hidden" name="type_id" value="<?php echo $type_data['type_id']; ?>">
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</body></html>